package com.viettel.pon.common;

import com.viettel.maps.base.LatLng;
import com.viettel.pon.logs.Log4jHelper;

import android.app.Application;
import android.os.Environment;
import android.util.DisplayMetrics;

public class GlobalClass extends Application {

	public String colCode;
	public String sid;
	public String locationId;
	public String userName;
	public Integer colId;
	public Integer timeListId;
	public Integer flag;
	public Integer flagMap;
	public Integer touchPoint;
	public Integer pointTouch;
	private LatLng cachePoint;
	private LatLng currentComparePoint;
	private int cacheAngle = -1;
	  public static boolean trueVersion=true;
	    public static String versionCode;
	    public static String pathFile;

	

	public int getCacheAngle() {
		return cacheAngle;
	}

	public String getLocationId() {
		return locationId;
	}

	public void setLocationId(String locationId) {
		this.locationId = locationId;
	}

	public void setCacheAngle(int cacheAngle) {
		this.cacheAngle = cacheAngle;
	}

	public LatLng getCurrentComparePoint() {
		return currentComparePoint;
	}

	public void setCurrentComparePoint(LatLng currentComparePoint) {
		this.currentComparePoint = currentComparePoint;
	}

	public LatLng getCachePoint() {
		return cachePoint;
	}

	public void setCachePoint(LatLng cachePoint) {
		this.cachePoint = cachePoint;
	}

	public Integer getTouchPoint() {
		return touchPoint;
	}

	public void setTouchPoint(Integer touchPoint) {
		this.touchPoint = touchPoint;
	}

	public Integer getFlagMap() {
		return flagMap;
	}

	public void setFlagMap(Integer flagMap) {
		this.flagMap = flagMap;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public Integer getTimeListId() {
		return timeListId;
	}

	public void setTimeListId(Integer timeListId) {
		this.timeListId = timeListId;
	}

	public Integer getColId() {
		return colId;
	}

	public void setColId(Integer colId) {
		this.colId = colId;
	}

	public String getColCode() {
		return colCode;
	}

	public void setColCode(String colCode) {
		this.colCode = colCode;
	}

	public String getSid() {
		return sid;
	}

	public void setSid(String sid) {
		this.sid = sid;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	private static GlobalClass singleton;

	public static GlobalClass getInstance() {
		return singleton;
	}

	@Override
	public void onCreate() {
		super.onCreate();
		singleton = this;
		// configure log4j
//		configureLog4j();
	}

	private void configureLog4j() {

		String fileName = Environment.getExternalStorageDirectory() + "/"
				+ "BRCD.log";
		String filePattern = "%d - [%c] - %p : %m%n";
		int maxBackupSize = 10;
		long maxFileSize = 1024 * 1024;

		Log4jHelper
				.Configure(fileName, filePattern, maxBackupSize, maxFileSize);
	}

}
